package com.syedu.day06.homework;

/**
 * description：屏幕类
 * @author Administrator
 * @date 2022/3/15 15:18
 */
public class Screen {
    String type;
    int size;
    String brand;

    public Screen() {

    }

    public Screen(String _type, int _size, String _brand) {
        type = _type;
        //判断
        if (_size == 17 || _size == 19 || _size == 23 || _size == 25) {
            size = _size;
        } else {
            System.err.println("尺寸不合法...");
            size = 17;
        }
        brand = _brand;
    }
}